Charging is a cost calculation system established by an operator to measure a network resource usage of a user based on a specific tariff policy. A packet switched network of an evolved packet core (EPC) supports two charging systems defined by the 3rd Generation Partnership Project (3GPP): an online charging system (OCS) and an offline charging system (OFCS). Online charging is implemented through interaction between a Gy interface and the OCS; and offline charging is implemented through interaction between a Ga interface and a CG. The charging system generates a user charging data record (CDR) and performs user rate settlement based on collected charging information.
Separation between control and forwarding is a most basic design idea in a gateway architecture design. Functions of a gateway are classified into two parts: a gateway controller (Gateway-Controller Plane, GW-C for short) and a gateway user plane (GW-U), which are respectively corresponding to a control plane and a forwarding plane of the gateway. The GW-C is mainly responsible for user access, policy control, and charging CDR management. The GW-U is mainly responsible for forwarding data, and implementing control and charging policies that are delivered by the control plane. The charging system reads statistics of the user on network resource usage and implements a charging function.
Currently, a disclosed charging method (an example in which a forwarding plane charging statistics report process triggered by the offline charging and the forwarding plane is used) mainly includes the following steps.
1. The GW-C sends a charging rule to the GW-U, where the charging rule carries a charging context identifier parameter.
The charging rule is a basis for charging, and is obtained by the GW-C from a policy and charging rules function (PCRF), or obtained from charging characteristics based on configuration mapping.
The charging context identifier parameter may be a service flow identifier, such as a UE IP, an IP 5-tuple of a service flow, or an identifier that has a packet header feature.
2. The GW-U sends forwarding plane charging statistics and the charging context identifier to the GW-C when a GW-U trigger condition occurs, for example, when a time/volume/service threshold is reached.
3. The GW-C associates the forwarding plane charging statistics with forwarding plane status information based on the charging context identifier, and generates a CDR.
4. The GW-C sends the CDR to the charging system.
A reporting path of the forwarding plane charging statistics in the conventional art is: GW-U→GW-C→charging system. The path is relatively long, and a transmission delay of the forwarding plane charging statistics is relatively high. Consequently, a charging delay is relatively high.